package main


import (
	"strings"
	"fmt"
	"bufio"
	"os"
	"strconv"
)



func main(){
	cin:=bufio.NewReader(os.Stdin)
	n,_:=cin.ReadString('\n')
	n=strings.Trim(n,"\n")
	n1,_:=strconv.Atoi(n)
	lines:=make([]string,0)
	for i:=0;i<n1;i++{
		l,_:=cin.ReadString('\n')
		l=strings.Trim(l,"\n")
		l=strings.Trim(l," ")
		if len(l)>0 && l[0]!='#'{
			lines=append(lines,l)
		}
	}
	
	fmt.Printf("%v\n",lines)
}